Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created by
brew bump
Created with
brew bump-formula-pr
.release notes
I added a builder pool and never returned the objects, this adds the Put().
dolt_pull()
was leaving working set dirtyCustomer-reported bug. Two
dolt_pull()
operations on two branches in the same session when local branches are already up to date, with@@autocommit
off, leave the session unable to commit because two branch heads are considered dirty. See new bats test for details on reproducing.The issue is that
DoltSession.SetWorkingSet()
marks that branch head dirty until the transaction is committed. Most merge code paths used by pull involve performing adolt_commit
(), which has the side effect of zeroing out the current transaction, meaning the next statement would get a new transaction and fresh working sets loaded from disk, avoiding the dirty state problem. Only the code path where the branch head is already up to date is affected by this bug. All the merge library code that actually needs to callDoltSession.SetWorkingSet()
(only necessary before adolt_commit
happens, or in the case of a squash where changes should remain in the working set) already does so, making the additional call indolt_pull.go
redundant and leading to this buggy behavior in the no-change case.There are probably still related bugs for session state management during pull and merge operations, but I want to keep this fix narrow to address the customer issue while I build up more robust (non-bats) tests for pull.
sqlfmt
packageWe have a few different APIs scattered around for generating SQL patch statements. I needed to make some functions from
dolt_patch_table_function.go
public to generate DDL statements for binlog support, so I moved them into thesqlfmt
package and cleaned up some package import cycles along the way.As part of the work for binlog source support (on fulghum/binlog_prototype branch), these are various smaller changes to tidy up docs, packaging, small bug fixes, and add new test utils that I've pulled out into this PR to review separately.
Notable changes:
go.mod
. Two component versions indicate a development version, not a release version and cause an error about not being able to download a toolchain.SOURCE_AUTO_POSITION
config parameter, and errors if a user attempts to disable GTID auto positioning.The new toolchain uses MUSL + mimalloc.
Include the mimalloc license in our released LICENSES notice.
The bulk of ~1ms read and write TPC-C queries benefit from caching table and index schemas, which have a lifecycle between schema migrations/alter statements/new table additions. This is in contrast to how we've typically cached objects using the root value hash, which is great for read-only workflows, but has a much shorter half-life.
go-mysql-server
ErrDatabaseNotFound
errorsWhen a database doesn't exist, MySQL returns error code 1049. This change adds a mapping to error code 1049 for
ErrDatabaseNotFound
errors, and updates our handler so thatComInitDB
messages will map errors to MySQL error codes.This is needed because tooling (e.g. Pomelo EntityFramework MySQL library) can rely on this error code in application logic.
Related to Pomelo Entity Framework connector is not able to recreate database. dolthub/dolt#7890
We use this library for running our tests. These are run with the
-race
flag - and we are seeing some errors related to concurrency and updating of the tables map.I've added a
sync.Mutex
to all the places where this map is updated - our tests are now passing :)This is the same as
InjectedExpr
, except for statements instead of expressions.This is seemingly the correct type for this field.
MySQL Connector/NET expects this for servers >8.0.1: https://github.com/mysql/mysql-connector-net/blob/8.4.0/MySQL.Data/src/SchemaProvider.cs#L298-L300
Fixes dolthub/go-mysql-server#2501
vitess
This is the same as
InjectedExpr
, except for statements instead of expressions.DATE
,TIME
, andTIMESTAMP
literal parsingThe SQL standard has special syntax for parsing date, time, and timestring literals.
https://dev.mysql.com/doc/refman/8.0/en/date-and-time-literals.html
This PR adds support for that.
Code was mostly taken from vitessio.
The types are still left as string types, as type conversion later on handles it just fine.
add support for statements like:
select cast(<str> as character)
select cast(<str> as double precision)
select cast(<str> as read)
Closed Issues